import request from '@/utils/request'
export default {
  getSpuList(id3,page,size){
    return request({
      url:`/admin/product/${page}/${size}`,
      method:'get',
      params:{
        category3Id:id3
      }
    })
  },
  //添加需要这2个请求
  getBaseSaleAttrList(){   
    return request({
      url:'/admin/product/baseSaleAttrList',
      method:'get'
    })
  },
  getTrademarkList(){
    return request({
      url:'/admin/product/baseTrademark/getTrademarkList'
    })
  },
  //修改需要额外2个请求
  getSpuImageList(id){
    return request({
      url:`/admin/product/spuImageList/${id}`,
      method:'get'
    })
  },
  getSpuSaleAttrList(id){
    return request({
      url:`/admin/product/spuSaleAttrList/${id}`,
      method:'get'
    })
  },
  saveSpuInfo(){   //添加新增spu
    return request({
      url:`/admin/product/saveSpuInfo`,
      method:'post'
    })
  },
  updateSpuInfo(){  //修改spu
    return request({
      url:`/admin/product/updateSpuInfo`,
      method:'post'
    })
  }
}